package com.hshh.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.hshh.dao.MemberDAO;

@Repository
public class MemberDAOImpl extends CommonDAOImpl implements MemberDAO {

	@Override
	public Integer selectPagingCount(HashMap<String, Object> paramMap) {
		return (Integer) getSqlSession().selectOne("MemberSql.selectPagingCount", paramMap);
	}

	public Object selectPagingList(HashMap<String, Object> paramMap, Integer startPage) {
		return getSqlSession().selectList("MemberSql.selectPagingList", paramMap, pageRowBounds(startPage));
	}
	@SuppressWarnings("unchecked")
	@Override
	public List<Map<String, Object>> selectCommonCode(String codeGroup) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("MemberSql.selectCommonCode", codeGroup);
	}

	@Override
	public Integer insertMember(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return getSqlSession().insert("MemberSql.insertMember", paramMap);
	}
	
	@SuppressWarnings("unchecked")
	@Override
	public Map<String, Object> selectMember(String user_id) {
		// TODO Auto-generated method stub
		return getSqlSession().selectMap("MemberSql.selectMember", user_id);
	}
}